Method For Controlling Robot, Robot System, And Storage Medium

ABSTRACT

Provided is a method for controlling a robot including a base, a robot arm coupled to the base, and a drive unit including a motor for driving the robot arm. The method includes a first step of acquiring weight information including information on a weight of an end effector installed on the robot arm and a weight of an object to be worked by the end effector; a second step of determining a frequency component to be removed from a drive signal for driving the motor based on the weight information acquired in the first step; and a third step of removing the frequency component determined in the second step from the drive signal to generate a correction drive signal.

The present application is based on, and claims priority from JPApplication Serial Number 2021-062362, filed Mar. 31, 2021, thedisclosure of which is hereby incorporated by reference herein in itsentirety.

BACKGROUND 1. Technical Field

The present disclosure relates to a method for controlling a robot, arobot system, and a non-transitory computer-readable storage mediumstoring a program for controlling a robot.

2. Related Art

In recent years, automation of work that has been done manually isaccelerating by various robots and robot peripheral devices due to anincrease in labor costs and lack of talents in a factory. As the variousrobots, for example, a robot as disclosed in JP-A-2001-293638 is known.

The robot of JP-A-2001-293638 performs the following operations in orderto reduce a vibration of an arm. First, the vibration is measured bytapping and vibrating an end effector provided on the arm. Next, anatural frequency of the arm is calculated based on a measurementresult. Then, based on the calculated natural frequency, a specificfrequency component is removed from a torque control signal foroperating the arm to correct the torque control signal.

By driving the arm with a corrected torque control signal, the vibrationgenerated in the arm can be reduced.

However, in the robot of JP-A-2001-293638, it is necessary to tap by ahammer and to prepare a measuring device for measuring the vibration inorder to specify the natural frequency, which is troublesome.

SUMMARY

A method for controlling a robot according to the present disclosure isa method for controlling a robot including a base, a robot arm coupledto the base, and a drive unit including a motor for driving the robotarm. The method includes: a first step of acquiring height informationon a height of a tip end of the robot arm during an operation of therobot arm or during a stop of the robot arm; a second step ofdetermining a frequency component to be removed from a drive signal fordriving the motor based on the height information acquired in the firststep; and a third step of removing the frequency component determined inthe second step from the drive signal to generate a correction drivesignal.

A robot system according to the present disclosure includes: a base; arobot arm coupled to the base; a drive unit including a motor fordriving the robot arm; and a control unit configured to control anactuation of the robot arm. The control unit includes: an acquisitionunit configured to acquire height information on a height of a tip endof the robot arm during an operation of the robot arm or during a stopof the robot arm, and a correction signal generation unit configured todetermine a frequency component to be removed from a drive signal basedon the height information acquired by the acquisition unit and to removethe determined frequency component from the drive signal to generate acorrection drive signal.

A non-transitory computer-readable storage medium according to thepresent disclosure stores a program for controlling a robot including abase, a robot arm coupled to the base, and a drive unit including amotor for driving the robot arm. The program is configured to cause therobot to execute: a first step of acquiring height information on aheight of a tip end of the robot arm during an operation of the robotarm or during a stop of the robot arm; a second step of determining afrequency component to be removed from a drive signal for driving themotor based on the height information acquired in the first step; and athird step of removing the frequency component determined in the secondstep from the drive signal to generate a correction drive signal.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic configuration diagram of a robot system accordingto the present disclosure.

FIG. 2 is a block diagram of the robot system shown in FIG. 1.

FIG. 3 is a block diagram of a control device shown in FIG. 1.

FIG. 4 is a diagram showing an example of a table referred to by anadjustment unit.

FIG. 5 is a diagram showing an example of tables referred to by theadjustment unit.

FIG. 6 is a diagram showing an example of tables referred to by theadjustment unit.

FIG. 7 is a diagram showing an example of tables referred to by theadjustment unit.

FIG. 8 is a side view showing a positional relationship between agravity center of a robot arm and a gravity center of an end effector ofa robot shown in FIG. 1.

FIG. 9 is a side view showing a positional relationship between thegravity center of the robot arm and the gravity center of the endeffector of the robot shown in FIG. 1.

FIG. 10 is a diagram showing an overall shape of the robot arm shown inFIG. 1.

FIG. 11 is a diagram showing the overall shape of the robot arm shown inFIG. 1.

FIG. 12 is a diagram illustrating an operation path of the robot armshown in FIG. 1.

FIG. 13 is a flowchart illustrating a method for controlling a robotaccording to the present disclosure.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

Hereinafter, a method for controlling a robot, a robot system, and anon-transitory computer-readable storage medium storing a program forcontrolling a robot according to the present disclosure will bedescribed in detail based on a preferred embodiment shown in theaccompanying drawings.

First Embodiment

FIG. 1 is a schematic configuration diagram of the robot systemaccording to the present disclosure. FIG. 2 is a block diagram of therobot system shown in FIG. 1. FIG. 3 is a block diagram of a controldevice shown in FIG. 1. FIGS. 4 to 7 are diagrams showing examples oftables referred to by an adjustment unit. FIGS. 8 and 9 are side viewsshowing positional relationships between a gravity center of a robot armof a robot and a gravity center of an end effector shown in FIG. 1.FIGS. 10 and 11 are diagrams showing overall shapes of the robot armshown in FIG. 1. FIG. 12 is a diagram illustrating an operation path ofthe robot arm shown in FIG. 1. FIG. 13 is a flowchart illustrating themethod for controlling a robot according to the present disclosure.

In FIG. 1, for convenience of description, an x axis, a y axis, and a zaxis are illustrated as three axes orthogonal to each other.Hereinafter, a direction parallel to the x axis is also referred to asan “x-axis direction”, a direction parallel to the y axis is alsoreferred to as a “y-axis direction”, and a direction parallel to the zaxis is also referred to as a “z-axis direction”. The z-axis directionin FIG. 1, that is, an upper-lower direction is referred to as a“vertical direction”, and the x-axis direction and the y-axis direction,that is, a left-right direction is referred to as a “horizontaldirection”. In each axis, a tip end side is referred to as a “+side”,and a base end side is referred to as a “−side”.

A robot system 100 shown in FIGS. 1 and 2 is a device used, for example,in operations for holding, conveying, assembling, inspecting, and thelike of an object (hereinafter referred to as a “workpiece”) to beworked by an electronic component and an electronic device. The robotsystem 100 includes a robot 2, a control device 8 that controls anactuation of the robot 2, a teaching device 3 that teaches the robot 2an operation program, a force detection unit 5, and an end effector 7.The robot 2, the control device 8, and the teaching device 3 cancommunicate with each other in a wired or wireless manner, and thecommunication may be performed via a network such as the Internet.

First, the robot 2 will be described.

In the illustrated configuration, the robot 2 is a horizontalarticulated robot, that is, a SCARA robot. However, the robot 2 is notlimited to the configuration, and may be an articulated robot such as avertical six-axis robot. As shown in FIG. 1, the robot 2 includes a base21, a robot arm 20 coupled to the base 21, and a receiving unit 4 thatreceives a predetermined operation from an operator.

The base 21 is a portion that supports the robot arm 20. The controldevice 8, which will be described later, is built in the base 21. Anorigin of a robot coordinate system is set at an optional portion of thebase 21. The x axis, the y axis, and the z axis shown in FIG. 1 are axesof the robot coordinate system.

The robot arm 20 includes a first arm 22, a second arm 23, and a thirdarm 24 which is a work head. A coupling portion between the base 21 andthe first arm 22, a coupling portion between the first arm 22 and thesecond arm 23, and a coupling portion between the second arm 23 and thethird arm 24 are also referred to as joints.

The robot 2 is not limited to the illustrated configuration, and thenumber of the arms may be one or two, and may be four or more.

The robot 2 includes a drive unit 25 that rotates the first arm 22 withrespect to the base 21, a drive unit 26 that rotates the second arm 23with respect to the first arm 22, a u drive unit 27 that rotates a shaft241 of the third arm 24 with respect to the second arm 23, and a z driveunit that moves the shaft 241 in the z-axis direction with respect tothe second arm 23.

As shown in FIGS. 1 and 2, the drive unit 25 is built in a housing 220of the first arm 22, and includes a motor 251 that generates a driveforce, a brake 252, a reduction gear (not shown) that decelerates thedrive force of the motor 251, and an encoder 253 that detects a rotationangle of a rotation axis of the motor 251 or the reduction gear.

The drive unit 26 is built in a housing 230 of the second arm 23, andincludes a motor 261 that generates a drive force, a brake 262, areduction gear (not shown) that decelerates the drive force of the motor261, and an encoder 263 that detects a rotation angle of a rotation axisof the motor 261 or the reduction gear.

The u drive unit 27 is built in the housing 230 of the second arm 23,and includes a motor 271 that generates a drive force, a brake 272, areduction gear (not shown) that decelerates the drive force of the motor271, and an encoder 273 that detects a rotation angle of a rotation axisof the motor 271 or the reduction gear.

The z drive unit 28 is built in the housing 230 of the second arm 23,and includes a motor 281 that generates a drive force, a brake 282, areduction gear (not shown) that decelerates the drive force of the motor281, and an encoder 283 that detects a rotation angle of a rotation axisof the motor 281 or the reduction gear.

As the motor 251, the motor 261, the motor 271, and the motor 281, forexample, a servo motor such as an AC servo motor or a DC servo motor canbe used. As the reduction gear, for example, a planetary-gear reductiongear, a wave gear device, or the like can be used.

The brake 252, the brake 262, the brake 272, and the brake 282 have afunction of decelerating the robot arm 20. Specifically, the brake 252decelerates an operation speed of the first arm 22, the brake 262decelerates an operation speed of the second arm 23, the brake 272decelerates an operation speed of the third arm 24 in a u-axisdirection, and the brake 282 decelerates an operation speed of the thirdarm 24 in the z-axis direction.

The control device 8 actuates the brake 252, the brake 262, the brake272, and the brake 282 by changing an energization condition todecelerate each part of the robot arm 20. The brake 252, the brake 262,the brake 272, and the brake 282 are controlled by the control device 8independently of the motor 251, the motor 261, the motor 271, and themotor 281.

Examples of the brake 252, the brake 262, the brake 272, and the brake282 include an electromagnetic brake, a mechanical brake, a hydraulicbrake, and a pneumatic brake, or the like.

As shown in FIG. 2, the encoder 253, the encoder 263, the encoder 273,and the encoder 283 are position detection units that detect a positionof the robot arm 20. The encoder 253, the encoder 263, the encoder 273,and the encoder 283 are electrically coupled to the control device 8.The encoder 253, the encoder 263, the encoder 273, and the encoder 283transmit information on the detected rotation angle to the controldevice 8 as an electrical signal. Accordingly, the control device 8 cancontrol an actuation of the robot arm 20 based on the receivedinformation on the rotation angle.

The drive unit 25, the drive unit 26, the u drive unit 27, and the zdrive unit 28 are coupled to a corresponding motor driver (not shown)respectively, and are controlled by the control device 8 via the motordriver.

The base 21 is fixed to, for example, a floor surface (not shown) withbolts or the like. The first arm 22 is coupled to an upper end portionof the base 21. The first arm is rotatable around a first axis O1 alongthe vertical direction with respect to the base 21. When the drive unit25 that rotates the first arm 22 is driven, the first arm 22 rotatesaround the first axis O1 in a horizontal plane with respect to the base21. A rotation amount of the first arm 22 with respect to the base 21can be detected by the encoder 253.

The second arm 23 is coupled to a tip end portion of the first arm 22.The second arm 23 is rotatable around a second axis O2 along thevertical direction with respect to the first arm 22. An axial directionof the first axis O1 is the same as an axial direction of the secondaxis O2. That is, the second axis O2 is parallel to the first axis O1.When the drive unit 26 that rotates the second arm 23 is driven, thesecond arm 23 rotates around the second axis O2 in the horizontal planewith respect to the first arm 22. A drive amount of the second arm 23with respect to the first arm 22, specifically, a rotation amount can bedetected by the encoder 263.

The third arm 24 is installed and supported at a tip end portion of thesecond arm 23. The third arm 24 includes the shaft 241. The shaft 241 isrotatable around a third axis O3 along the vertical direction withrespect to the second arm 23 and is movable in the upper-lowerdirection. The shaft 241 is the arm at the most tip end of the robot arm20.

When the u drive unit 27 that rotates the shaft 241 is driven, the shaft241 rotates around the z axis. A rotation amount of the shaft 241 withrespect to the second arm 23 can be detected by the encoder 273.

When the z drive unit 28 that moves the shaft 241 in the z-axisdirection is driven, the shaft 241 moves in the upper-lower direction,that is, in the z-axis direction. A movement amount of the shaft 241 inthe z-axis direction with respect to the second arm 23 can be detectedby the encoder 283.

In the robot 2, a tip end coordinate system in which a tip end of theshaft 241 is set as a control point TCP, and the control point TCP isset as an origin is set. The tip end coordinate system is calibratedwith the robot coordinate system described above, and a position in thetip end coordinate system can be converted into the robot coordinatesystem. Accordingly, a position of the control point TCP can bespecified in the robot coordinate system.

Various end effectors 7 are detachably coupled to a lower end portion ofthe shaft 241. In the illustrated configuration, the end effector 7 is ahand for gripping a workpiece. However, the end effector is not limitedto the configuration, and may be, for example, a hand for gripping theworkpiece by absorption or suction, a tool such as a driver or a wrench,or a coating tool such as a spray.

In the present embodiment, although the end effector 7 is not acomponent of the robot 2, a part or all of the end effector 7 may be acomponent of the robot 2.

As shown in FIG. 1, the force detection unit 5 detects a force appliedto the robot 2, that is, a force applied to the robot arm 20 and thebase 21. In the present embodiment, the force detection unit 5 isprovided below the base 21, that is, on a −z axis side, and supports thebase 21 from below.

An installation position of the force detection unit 5 is not limited tothe above, and may be, for example, the lower end portion of the shaft241 or each joint portion.

The force detection unit 5 is constituted by, for example, apiezoelectric body such as a crystal, and can include a plurality ofelements that output charges when an external force is received. Thecontrol device 8 can convert an amount of the charge into a valuerelated to the external force received by the robot arm 20. In addition,with such a piezoelectric body, an orientation in which the charges canbe generated when the external force is received can be adjustedaccording to an installation orientation.

The receiving unit 4 is a part that receives the predetermined operationof the operator. The receiving unit 4 includes a teaching button (notshown). The teaching button can be used for direct teaching. Theteaching button may be a mechanical button or a touch-type electricbutton. Other buttons having different functions may be installed aroundthe teaching button.

Next, the teaching device 3 will be described.

As shown in FIG. 2, the teaching device 3 has a function of designatingthe operation program to the robot 2. Specifically, the teaching device3 inputs the position and a posture of the robot arm 20 to the controldevice 8.

As shown in FIG. 2, the teaching device 3 includes a central processingunit (CPU) 31, a storage unit 32, a communication unit 33, and a displayunit 34. The teaching device 3 is not particularly limited, and examplesthereof include a tablet, a personal computer, a smartphone, and thelike.

The CPU 31 reads and executes various programs and the like stored inthe storage unit 32. A signal generated by the CPU 31 is transmitted tothe control device 8 of the robot 2 via the communication unit 33.Accordingly, the robot arm 20 can perform a predetermined work under apredetermined condition.

The storage unit 32 stores the various programs and the like executableby the CPU 31. Examples of the storage unit 32 include a volatile memorysuch as a random access memory (RAM), a nonvolatile memory such as aread only memory (ROM), and a detachable external storage device.

The communication unit 33 transmits and receives a signal to and fromthe control device 8 by using, for example, an external interface suchas a wired local area network (LAN) or a wireless LAN.

The display unit 34 is constituted by various displays. In the presentembodiment, as an example, a touch panel type display unit, that is, aconfiguration in which the display unit 34 has a display function and aninput operation function will be described.

However, the display unit is not limited to such a configuration, andmay separately include an input operation unit. In this case, examplesof the input operation unit include a mouse, a keyboard, and the like.In addition, the display unit may be a configuration in which a touchpanel, the mouse, the keyboard, and the like are used in combination.

Next, the control device 8 will be described.

As shown in FIG. 1, the control device 8 is built in the base 21 in thepresent embodiment. As shown in FIG. 2, the control device 8 has afunction of controlling driving of the robot 2, and is electricallycoupled to each unit of the robot 2 described above. The control device8 is not limited thereto, and may be configured separately from therobot 2.

When the robot arm 20 is temporarily stopped during the work or stoppedafter finishing the work, a vibration is generated in the robot arm 20.Since the vibration affects work accuracy and work time, it ispreferable to reduce the vibration as much as possible. Morespecifically, it is preferable that a time until the vibration is dampedis as short as possible. Hereinafter, shortening the time until thevibration is damped is referred to as “reducing the vibration”.

In order to reduce the vibration, in the robot system 100, a specificfrequency component is removed from a drive signal for driving the motor251, the motor 261, the motor 271, and the motor 281 to generate acorrection drive signal.

A strength of the vibration is determined by various conditions such asa weight of the end effector 7, the posture of the robot arm 20 when therobot arm 20 is stopped, the position of the control point TCP, a pathfollowed so far, a speed and an acceleration in the path, and the like.

In order to determine which frequency component is removed from thedrive signal to generate the correction drive signal, it is preferableto take these conditions into consideration. Among these, since heightinformation on a height of a tip end of the robot arm 20 during anoperation of the robot arm 20 or during a stop of the robot arm 20 tendsto particularly affect vibration reduction, the correction drive signalis generated based on the height information in the present disclosure.In the present embodiment, the height of the tip end of the robot arm 20means a z-axis coordinate of the control point TCP set in the robot arm20 in the robot coordinate system. This will be described in detailbelow.

As shown in FIG. 3, the control device 8 executes the method forcontrolling a robot according to the present disclosure, and includes amotion processing unit 8A, a servo processing unit 8B, a storage unit8C, and a communication unit 8D. The motion processing unit 8A and theservo processing unit 8B are each constituted by at least one processor.

The storage unit 8C stores various programs executable by the motionprocessing unit 8A and the servo processing unit 8B, various programssuch as the program for controlling a robot according to the presentdisclosure, tables described later, and the like. Examples of thestorage unit 8C include a volatile memory such as a random access memory(RAM), a nonvolatile memory such as a read only memory (ROM), and adetachable external storage device. The communication unit 8D enablessignals to be transmitted and received between each unit of the robot 2and the teaching device 3 by using, for example, an external interfacesuch as a wired local area network (LAN) or a wireless LAN.

The motion processing unit 8A includes a position command generationunit 81 and an adjustment unit 82.

The position command generation unit 81 generates a position commandsignal indicating a target position to be positioned by the end effector7, and a speed and an acceleration to the target position based on anoperation program input by a user. The user can input the operationprogram by using an input device such as the teaching device 3.

The adjustment unit 82 determines a frequency component to be removed bya filter processing unit 85 based on information input by the user. Thiswill be described later.

The servo processing unit 8B includes a position control unit 83, aspeed control unit 84, the filter processing unit 85, and a currentcontrol unit 86.

The position control unit 83 receives information on the targetposition, and the speed and the acceleration to the target positiongenerated by the position command generation unit 81, and generates andoutputs speed control signals of the motor 251, the motor 261, the motor271, and the motor 281 based on the information and a detection resultof the force detection unit 5.

The speed control unit 84 receives the speed control signal from theposition control unit 83. The speed control unit 84 generates a torquecontrol signal (hereinafter, also referred to as the “drive signal”)based on the speed control signal received from the position controlunit 83 and detection results of the encoder 253, the encoder 263, theencoder 273, and the encoder 283, and outputs the torque control signalto the filter processing unit 85.

The filter processing unit 85 generates a new torque control signal(hereinafter, also referred to as the “correction drive signal”) byremoving the specific frequency component from the torque control signalreceived from the speed control unit 84 by using a band removing filter,and outputs the new torque control signal to the current control unit86. In this specification, “removing” includes not only setting thespecific frequency component to 0 but also reducing the specificfrequency component. The filter processing unit 85 determines acoefficient used in the band removing filter, that is, the frequencycomponent to be removed by using the band removing filter, based on asignal output by the adjustment unit 82.

The current control unit 86 receives the torque control signal from thefilter processing unit 85, and receives a feedback signal indicating anamount of current supplied to the motor 251, the motor 261, the motor271, and the motor 281 from a servo amplifier (not shown). The currentcontrol unit 86 determines the amount of current to be supplied to themotor 251, the motor 261, the motor 271, and the motor 281 based on thetorque control signal received from the filter processing unit 85 andthe feedback signal received from the servo amplifier (not shown), anddrives the motor 251, the motor 261, the motor 271, and the motor 281.

In the robot system 100, the user can input the height information. Forexample, the user can acquire information on a trajectory through whichthe control point TCP passes by inputting information on the operationpath by using the teaching device 3. The height information will bedescribed as a height when the control point TCP is positioned at afinal target position.

For example, the time until the vibration is damped differs between acase where the height of the control point TCP at the time of stoppingis at a position as shown in FIG. 8 and a case where the height of thecontrol point TCP at the time of stopping is at a position as shown inFIG. 9. In general, the lower the height of the control point TCP is,the longer the time until the vibration is damped is. In the illustratedconfiguration, the time until the vibration is damped tends to be longerat a height C2 than at a height C1.

Therefore, the vibration can be reduced by generating the correctiondrive signal in consideration of the height of the control point TCP ina predetermined posture of the robot arm 20, that is, a position in thez-axis direction. Specifically, the adjustment unit 82 determines afrequency component to be removed from the drive signal for driving themotor 251, the motor 261, the motor 271, and the motor 281 based on theheight information. Specifically, the adjustment unit 82 determines thefrequency component to be removed with reference to a table T1 shown inFIG. 4. The table T1 indicates a relationship between the heightinformation and the frequency component, and is experimentally obtainedin advance. The frequency component to be removed may be determinedbased on a calibration curve indicating the relationship between theheight information and the frequency component instead of the table T1.

As shown in FIG. 4, for example, when the height information is C1, thefrequency component to be removed is F1. The adjustment unit 82 outputsa signal corresponding to F1 to the filter processing unit 85. Thecorrection drive signal can be obtained through the processing describedabove. By driving the motor 251, the motor 261, the motor 271, and themotor 281 with such a correction drive signal, a resonance of the robotarm 20, the end effector 7, and the like can be reduced by the removedfrequency component, and the time until the vibration is damped can beshortened.

Next, a case where the robot arm 20 performs an operation as shown inFIG. 12 will be described. FIG. 12 illustrates the trajectory of thecontrol point TCP. The operation shown FIG. 12 is an operation in whicha lifting operation is performed, a horizontal operation is performed,and a lowering operation is performed. The lifting operation isperformed from a lifting operation start position P1 to a liftingoperation end position P2. The horizontal operation is performed fromthe lifting operation end position P2 to a lowering operation startposition P3. The lowering operation is performed from the loweringoperation start position P3 to a lowering operation end position P4.

Although the configuration in which the frequency component to beremoved is determined based on the height of the control point TCP atthe lowering operation end position P4 has been described above, it maybe better to determine the frequency component to be removed based onthe height of the control point TCP at the lifting operation startposition P1 or the lowering operation start position P3 depending onvarious conditions in order to reduce the vibration in the horizontaldirection. Specifically, when none of the following conditions 1, 2, and3 is satisfied, the frequency component to be removed is determinedbased on the height of the control point TCP at the lifting operationstart position P1.

When at least one of the following conditions 1, 2, and 3 is satisfied,the frequency component to be removed is determined based on the heightof the control point TCP at the lowering operation start position P3,and when none of the following conditions 1, 2, and 3 is satisfied, thefrequency component to be removed is determined based on the height ofthe control point TCP at the lifting operation start position P1.

Condition 1: A distance between the lowering operation start position P3and the lowering operation end position P4 at which the loweringoperation is ended is equal to or greater than a predetermined distance.

Condition 2: A height of the lowering operation start position P3 isequal to or higher than a predetermined height.

Condition 3: A height of the lowering operation end position P4 at whichthe lowering operation is ended is equal to or higher than apredetermined height.

The condition 1 is a definition relating to a distance for performingthe lowering operation. When the distance for performing the loweringoperation is relatively long, it is preferable to determine thefrequency component to be removed based on the height of the controlpoint TCP at the lowering operation start position P3. Accordingly, adrive signal capable of reducing the vibration of a horizontal componentcan be generated.

The condition 2 is a definition relating to the height of the loweringoperation start position P3. When the height of the lowering operationstart position P3 is relatively high, it is preferable to determine thefrequency component to be removed based on the height of the controlpoint TCP at the lowering operation start position P3. Accordingly, adrive signal capable of reducing the vibration of a horizontal componentcan be generated.

The condition 3 is a definition relating to the height of the loweringoperation end position P4. When the height of the lowering operation endposition P4 is relatively high, it is preferable to determine thefrequency component to be removed based on the height of the controlpoint TCP at the lowering operation start position P3. Accordingly, adrive signal capable of reducing the vibration of a horizontal componentcan be generated.

In this way, by selecting a reference position for determining thefrequency component to be removed according to the condition of theoperation, the vibration can be reduced more effectively. The“Selecting” includes both a case where the control device 3 performsselection based on a determination criterion and a case where aninstruction selected and input by the user is accepted.

When the frequency component to be removed is F0, F0 can be expressed bythe following equation (1).

F0=K1×W×Ew×J ² +K2×Ez×Z×J+K0×W×Z  (1)

K1, K2, and K0 in the equation (1) are coefficients unique to the robotand can be calculated from actual measurement values. J in the equation(1) indicates the rotation angle of the second arm 23 with respect tothe first arm 22. W in the equation (1) indicates weight information. Zin the equation (1) indicates the position of the control point TCP inthe z-axis direction. Ew in the equation (1) indicates a total weight ofthe end effector 7 and the workpiece. Ez in the equation (1) indicates aposition of a gravity center obtained by combining the end effector 7with the workpiece.

Therefore, in addition to the height information, it is preferable togenerate the correction drive signal in consideration of at least one ofthese factors.

In the robot system 100, the user can input information on the weight ofthe end effector 7 and a weight of the workpiece via the teaching device3. For example, the user may directly input the weight of the endeffector 7 and the weight of the workpiece, or the adjustment unit 82may specify the weight of the end effector 7 based on a table indicatinga relationship between an input result and the weight of the endeffector 7 by inputting a type of the end effector 7. The weight of theworkpiece may also be specified by using a table in the same manner. Theadjustment unit 82 determines the frequency component to be removed fromthe drive signal in consideration of information (hereinafter, referredto as the “weight information”) on the weight of the end effector 7 andthe weight of the workpiece.

For example, the time until the vibration is damped differs between acase where the weight of the end effector 7 and the weight of theworkpiece are relatively heavy W1 and a case where the weight of the endeffector 7 and the weight of the workpiece are relatively heavy W2. Ingeneral, the heavier the weight of the end effector 7 and the weight ofthe workpiece, the longer the time until the vibration is damped. Inconsideration of this, as shown in FIG. 5, by preparing the table T1described above for each weight information and generating thecorrection drive signal by referring to any one of these tablesaccording to the weight information, the correction drive signal withhigher accuracy of the vibration reduction can be generated.

When the end effector 7 does not grip the workpiece, the weight of theworkpiece is 0, and the weight information is only the weight of the endeffector 7.

It is preferable to generate the correction drive signal inconsideration of a positional relationship between a gravity center G1of the robot arm 20 in the predetermined posture and a gravity center G2of the end effector 7. The predetermined posture in the presentembodiment refers to a posture in which the control point TCP is stoppedor temporarily stopped at the target position. The time until thevibration is damped differs between a case where the positionalrelationship between the gravity center G1 and the gravity center G2 atthe time of stopping is a positional relationship A1 as shown in FIG. 8and a case where the positional relationship between the gravity centerG1 and the gravity center G2 at the time of stopping is a positionalrelationship A2 as shown in FIG. 9. This is because the naturalvibration characteristics of the entire robot 2 change depending on adistance between the gravity center G1 and the gravity center G2 and adirection in which the gravity center G1 and the gravity center G2deviate.

In consideration of this, as shown in FIG. 6, by preparing the table T1described above for each positional relationship between the gravitycenter G1 and the gravity center G2 and generating the correction drivesignal by referring to any one of these tables according to thepositional relationship, the correction drive signal with higheraccuracy of the vibration reduction can be generated.

It is preferable to generate the correction drive signal inconsideration of an overall shape of the robot arm in the predeterminedposture of the robot arm 20. The overall shape of the robot arm 20 isdetermined based on rotation positions of the motor 251, the motor 261,the motor 271, and the motor 281. In particular, in the SCARA robot, therotation angle of the motor 261, that is, an angle formed by the firstarm 22 and the second arm 23 has a large influence on vibrationcharacteristics. Information on the overall shape of the robot arm 20 isincluded in the information of the operation path input by the user.Therefore, when the user inputs the information on the operation path,the control device 8 can grasp the posture stopped or temporarilystopped at the target position.

The time until the vibration is damped differs between a case where theoverall shape of the robot arm 20 at the time of stopping is a shape B1as shown in FIG. 10 and a case where the overall shape of the robot arm20 at the time of stopping is a shape B2 as shown in FIG. 11. This ismainly because the natural vibration characteristics of the entire robot2 change according to a distance between the position of the controlpoint TCP and a root of the robot arm 20.

In consideration of this, as shown in FIG. 7, by preparing the tables T1described above for each overall shape of the robot arm 20, inparticular, for each angle formed by the first arm 22 and the second arm23 and generating the correction drive signal by referring to one ofthese tables, the correction drive signal with higher accuracy of thevibration reduction can be generated. In particular, such control iseffective when applied to a vertical articulated robot such as asix-axis robot.

The correction drive signal may be generated by combining theseelements. A multidimensional table indicating a relationship between theelements may be prepared.

Next, an example of the method for controlling a robot according to thepresent disclosure will be described with reference to a flowchart shownin FIG. 13.

First, in step S101, the height information is acquired. As describedabove, this step is performed by inputting various information such asthe height information by using the teaching device 3 by the user andacquiring the information by the control device 8. Step S101 is a firststep.

Next, in step S102, the frequency component to be removed from the drivesignal for driving the motor 251, the motor 261, the motor 271, and themotor 281 is determined based on the various information such as theheight information acquired in step S101. This step is executed by theadjustment unit 82. As described above, the step is executed byappropriately selecting a table according to the information input instep S101 and referring to the selected table. Step S102 is a secondstep.

Next, in step S103, the frequency component determined in step S102 isremoved from the drive signal to generate the correction drive signal.The step is executed by the filter processing unit 85 as describedabove. Step S103 is a third step.

Next, in step S104, the motor 251, the motor 261, the motor 271, and themotor 281 are driven based on the correction drive signal generated instep S103. Accordingly, the vibration at the time of stopping ortemporarily stopping can be reduced, and the work can be performedaccurately and quickly. Step S104 is a fourth step.

As described above, the method for controlling a robot according to thepresent disclosure is a method for controlling the robot 2 including thebase 21, the robot arm 20 coupled to the base 21, and the drive unit 25,the drive unit 26, the u drive unit 27, and the z drive unit 28including the motor 251, the motor 261, the motor 271, and the motor 281respectively, which drive the robot arm 20. The method for controlling arobot according to the present disclosure includes the first step ofacquiring the height information on the height of the tip end of therobot arm 20, that is, the height of the control point TCP during theoperation of the robot arm 20 or during the stop of the robot arm 20,the second step of determining the frequency component to be removedfrom the drive signal for driving the motor 251, the motor 261, themotor 271, and the motor 281 based on the height information acquired inthe first step, and the third step of removing the frequency componentdetermined in the second step from the drive signal to generate thecorrection drive signal. By driving the robot 2 with such a correctiondrive signal, the vibration at the time of stopping or temporarilystopping can be reduced, and the work can be performed accurately andquickly. In particular, a process of tapping the robot arm with a hammerto acquire information on the vibration characteristics as in therelated art can be omitted, and the vibration can be reduced by a simplemethod.

In the present embodiment, various information may be input by using aninput device other than the teaching device 3.

In the second step, the frequency component is determined based on acalibration curve or a table indicating the relationship between thefrequency component and the height information. Accordingly, thefrequency component to be removed can be determined by simpleprocessing.

The robot arm 20 executes the lifting operation in which the tip end ofthe robot arm 20 is lifted from the lifting operation start position P1and the lowering operation in which the tip end of the robot arm 20 islowered from the lowering operation start position P3 after the liftingoperation. The determination of the frequency component in the secondstep is performed based on the height of the tip end of the robot arm atany one of the operation start position P1 and the lowering operationstart position P3, that is, the height of the control point TCP.Accordingly, a drive signal capable of reducing the vibration of ahorizontal component can be generated.

The determination of the frequency component in the second step isperformed based on the height of the tip end of the robot arm 20 at thelowering operation start position P3, that is, the height of the controlpoint TCP when at least one of the following conditions 1, 2, and 3 issatisfied, and is performed based on the height of the control point TCPat the lifting operation start position P1 when none of the followingconditions 1, 2, and 3 is satisfied. Condition 1: A distance between thelowering operation start position and the lowering operation endposition at which the lowering operation is ended is equal to or greaterthan a predetermined distance. Condition 2: A height of the loweringoperation start position is equal to or higher than a predeterminedheight. Condition 3: A height of the lowering operation end position atwhich the lowering operation is ended is equal to or higher than apredetermined height. Accordingly, the drive signal capable of reducingthe vibration of a horizontal component can be generated.

The determination of the frequency component in the second step isperformed further based on the weight information including informationon the weight of the end effector 7 installed on the robot arm 20 and aweight of an object to be worked by the end effector 7. Accordingly, thecorrection drive signal with higher accuracy of the vibration reductioncan be generated.

The robot 2 is a SCARA robot, and the robot arm 20 includes the firstarm 22 coupled to the base 21, the second arm 23 coupled to the firstarm 22, and the third arm 24 coupled to the second arm 23. Thedetermination of the frequency component in the second step is performedfurther based on the angle formed by the first arm 22 and the second arm23 in the predetermined posture of the robot arm 20. Accordingly, thecorrection drive signal with higher accuracy of the vibration reductioncan be generated.

In the third step, the frequency component determined in the second stepis removed from the drive signal by using the band removing filter togenerate the correction drive signal. Accordingly, the correction drivesignal can be generated by simple processing.

The method for controlling a robot according to the present disclosureincludes the fourth step of driving the drive unit 25, the drive unit26, the u drive unit 27, and the z drive unit 28 based on the correctiondrive signal. Accordingly, the vibration at the time of stopping ortemporarily stopping can be reduced, and the work can be performedaccurately and quickly.

The non-transitory computer-readable storage medium storing a programfor controlling a robot according to the present disclosure is anon-transitory computer-readable storage medium storing a program forcontrolling the robot 2 including the robot arm 20, and the drive unit25, the drive unit 26, the u drive unit 27, and the z drive unit 28including the motor 251, the motor 261, the motor 271, and the motor 281respectively, which drive the robot arm 20. The non-transitorycomputer-readable storage medium storing a program for controlling arobot according to the present disclosure causes the robot to executethe first step of acquiring the height information on the height of thetip end of the robot arm 20, that is, the height of the control pointTCP during the operation of the robot arm 20 or during the stop of therobot arm 20, the second step of determining the frequency component tobe removed from the drive signal for driving the motor 251, the motor261, the motor 271, and the motor 281 based on the height informationacquired in the first step, and the third step of removing the frequencycomponent determined in the second step from the drive signal togenerate the correction drive signal. By driving the robot 2 with thecorrection drive signal obtained by executing such a program forcontrolling a robot, the vibration at the time of stopping ortemporarily stopping can be reduced, and the work can be performedaccurately and quickly. In particular, the process of tapping the robotarm 20 with a hammer to acquire the information on the vibrationcharacteristics as in the related art can be omitted, and the vibrationcan be reduced by a simple method.

The non-transitory computer-readable storage medium storing a programfor controlling a robot according to the present disclosure may bestored in the storage unit 32, may be stored in the storage unit 8C, maybe stored in a recording medium such as a CD-ROM, or may be stored in astorage device that can be coupled via a network or the like.

The robot system according to the present disclosure includes the robotarm 20, and the drive unit 25, the drive unit 26, the u drive unit 27,and the z drive unit 28 including the motor 251, the motor 261, themotor 271, and the motor 281 respectively, which drive the robot arm 20,and the control device 8 that is a control unit that controls theactuation of the robot arm 20. The control device 8 includes thecommunication unit 8D that is an acquisition unit that acquires theheight information on the tip end of the robot arm 20, that is, theheight of the control point TCP during the operation of the robot arm 20or during the stop of the robot arm 20, and the adjustment unit 82 andthe filter processing unit 85, which are correction signal generationunits that determine the frequency component to be removed from thedrive signal based on the height information acquired from thecommunication unit 8D and remove the determined frequency component fromthe drive signal to generate the correction drive signal. By driving therobot 2 with such a correction drive signal, the vibration at the timeof stopping or temporarily stopping can be reduced, and the work can beperformed accurately and quickly. In particular, the process of tappingthe robot arm 20 with a hammer to acquire the information on thevibration characteristics as in the related art can be omitted, and thevibration can be reduced by a simple method.

Although the method for controlling a robot, the robot system, and thenon-transitory computer-readable storage medium storing a program forcontrolling a robot according to the present disclosure have beendescribed above based on the illustrated embodiment, the presentdisclosure is not limited thereto. A configuration of each unit can bereplaced with any configuration having a similar function. In addition,any other components and processes may be added to the method forcontrolling a robot, the robot system, and the non-transitorycomputer-readable storage medium storing a program for controlling arobot.

In the embodiment described above, although the configuration in whichthe control device 8 generates the correction drive signal has beendescribed, the present disclosure is not limited thereto, and theteaching device 3 may generate the correction drive signal. That is, the“control unit” may be regarded as the control device 8 or may beregarded as a control unit built in the teaching device 3.

What is claimed is:
 1. A method for controlling a robot including abase, a robot arm coupled to the base, and a drive unit including amotor for driving the robot arm, the method comprising: a first step ofacquiring height information on a height of a tip end of the robot armduring an operation of the robot arm or during a stop of the robot arm;a second step of determining a frequency component to be removed from adrive signal for driving the motor based on the height informationacquired in the first step; and a third step of removing the frequencycomponent determined in the second step from the drive signal togenerate a correction drive signal.
 2. The method for controlling arobot according to claim 1, wherein in the second step, the frequencycomponent is determined based on a calibration curve or a tableindicating a relationship between the frequency component and the heightinformation.
 3. The method for controlling a robot according to claim 1,wherein the robot arm is configured to execute a lifting operation inwhich the tip end of the robot arm is lifted from an operation startposition and a lowering operation in which the tip end of the robot armis lowered from a lowering operation start position after the liftingoperation, and the determination of the frequency component in thesecond step is performed based on a height of the tip end of the robotarm at a position which is obtained by selecting one of the operationstart position and the lowering operation start position.
 4. The methodfor controlling a robot according to claim 3, wherein in the secondstep, when at least one of the following conditions 1, 2, and 3 issatisfied, the frequency component is determined based on a height ofthe tip end of the robot arm at the lowering operation start position,and when none of the following conditions 1, 2, and 3 is satisfied, thefrequency component is determined based on a height of the tip end ofthe robot arm at the operation start position, condition 1: a distancebetween the lowering operation start position and a lowering operationend position at which the lowering operation is ended is equal to orgreater than a predetermined distance, condition 2: a height of thelowering operation start position is equal to or higher than apredetermined height, and condition 3: a height of the loweringoperation end position is equal to or higher than a predeterminedheight.
 5. The method for controlling a robot according to claim 1,wherein the determination of the frequency component in the second stepis performed further based on weight information including informationon a weight of an end effector installed on the robot arm and a weightof an object to be worked by the end effector.
 6. The method forcontrolling a robot according to claim 1, wherein the robot is a SCARArobot, the robot arm includes a first arm, a second arm coupled to thefirst arm, and a third arm coupled to the second arm, and thedetermination of the frequency component in the second step is performedfurther based on an angle formed by the first arm and the second arm ina predetermined posture of the robot arm.
 7. The method for controllinga robot according to claim 1, wherein in the third step, the frequencycomponent determined in the second step is removed from the drive signalby using a band removing filter to generate the correction drive signal.8. The method for controlling a robot according to claim 1, furthercomprising: a fourth step of driving the drive unit based on thecorrection drive signal.
 9. A robot system, comprising: a robot arm; adrive unit including a motor for driving the robot arm; and a controlunit configured to control an actuation of the robot arm, wherein thecontrol unit includes: an acquisition unit configured to acquire heightinformation on a height of a tip end of the robot arm during anoperation of the robot arm or during a stop of the robot arm, and acorrection signal generation unit configured to determine a frequencycomponent to be removed from a drive signal based on the heightinformation acquired by the acquisition unit and to remove thedetermined frequency component from the drive signal to generate acorrection drive signal.
 10. A non-transitory computer-readable storagemedium storing a program for controlling a robot including a robot armand a drive unit including a motor for driving the robot arm, theprogram causing the robot to execute: a first step of acquiring heightinformation on a height of a tip end of the robot arm during anoperation of the robot arm or during a stop of the robot arm; a secondstep of determining a frequency component to be removed from a drivesignal for driving the motor based on the height information acquired inthe first step; and a third step of removing the frequency componentdetermined in the second step from the drive signal to generate acorrection drive signal.